<template>
	<view class="conten">
        <view class="coupon-cart">

        </view>

        <view  class="code-input">
            <u--input
                placeholder="输入兑换码"
                suffixIconStyle="color: #909399"
                v-model="codeText"
            >
            </u--input>
        </view>


        <view class="btn-box">
            <u-button class="btn"
                :stus=" !codeText == false ? 'true' : 'false' "
                type="primary"
                size="small"
                @click="handleTabClick"
                shape="circle"
            >立即兑换</u-button>
            <u-button class="btn"
                type="primary"
                size="small"
                @click="handleTabClick2"
                shape="circle"
            >兑换记录</u-button>
        </view>
	</view>
</template>

<script>
export default {
    data() {
        return {
            codeText: '',
            disabled: false,
            value1: 0,
			list1: [
                {
                    name: '可使用',
                }, 
                {
                    name: '已使用',
                }, 
				{
                    name: '已失效',
                }, 
            ],
			itemStyle: {
                width:'80px',
                height: '45px',
                lineHeight: '45px',
                textAlign: 'center',
            },
        }
    },
    onLoad() {
        console.log('页面加载完成');
    },
    methods: {
        handleTabClick(e) {
            try {
                console.log('点击了标签栏', e);
                // 在这里可以添加更多的逻辑处理
            } catch (error) {
                console.error('标签栏点击处理时出错:', error);
            }
        },
		
    }
}
</script>

<style scoped lang="scss">
$dif-width: calc(100% - 40px);
.conten{
    width: 100%;
    overflow: hidden;
    .coupon-cart{
        margin: 0 auto;
        margin-top: 5px;
        width: $dif-width;
        height: 180px;
        background-color: #fff;
        box-shadow: 0 0 10px #ccc;
        overflow: hidden;
        border-radius: 8px;
    }
    .code-input{
        width: $dif-width;
        margin: 0 auto;
        margin-top: 10px;
        width: $dif-width;
    }
    .btn-box{
        // border: 1px solid #ccc;
        width: 100vw;
        height: 80px;
        position: fixed;
        bottom: 10px;
        left: 0;
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;

        .btn{
            width: $dif-width ;
            height: 35px;
            border: none;
            margin-top: auto;
            font-size: 16px;
        }
        .btn:last-child{
            background-color: #ccc00000;

            color: #ed7e00;
        }
        .btn[stus="true"]{
            background-color: #000;
            color: #fff;
        }
        .btn[stus="false"]{
            background-color: #ccc;
        }
    }
}	
</style>
